<template>
  <div class="header-search">
    <el-input placeholder="菜单搜索  Ctrl+K" suffix-icon="search" @click.stop="showSearch" readonly />
    <GlobalSearch v-model="show"></GlobalSearch>
  </div>
</template>

<script setup>
import hotkeys from 'hotkeys-js';
import GlobalSearch from "../GlobalSearch"
const show = ref(false);
const showSearch = () => {
  show.value = true;
}

hotkeys("ctrl+key", (e) => {
    e.preventDefault();
    showSearch();
})


</script>